package com.awesomeproject;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Administrator on 2016/12/10.
 * 登录的activity
 */

public class LoginActivity extends MyBaseActivity {
    @BindView(R.id.bt_login)
    Button bt_login;
    @BindView(R.id.edit_UserName)
    EditText et_userName;
    @BindView(R.id.et_password)
    EditText et_password;

    @Override
    public int getViewId() {
        return R.layout.activity_login;
    }



    @Override
    protected void initVariables() {

    }

    @Override
    protected void initView(Bundle savedInstanceState) {

    }

    @Override
    protected void loadData() {

    }
    @OnClick(R.id.bt_login)
    public void login() {
        String userName=et_userName.getText().toString().trim();
        String password=et_password.getText().toString().trim();
        if (!userName.isEmpty()&&!password.isEmpty())
        {
            Intent intent=new Intent(LoginActivity.this,HomeActivity.class);
            startActivity(intent);
            finish();
        }
        else {
            Toast.makeText(getBaseContext(),"请输入账号密码",Toast.LENGTH_SHORT).show();
        }
    }
    @OnClick(R.id.tv_forget_password)
    public void fg()
    {
    }
    @OnClick(R.id.tv_regedit)
    public void regedit()
    {
    }



}
